Repository navigation
Placement P3 (facts out): t3_environment_read returns hostResources and placement - #820
Merged
Merged
Conversation
…nd placement t3_environment_read now returns two optional fields beside upstream's, for this machine and for a linked one (the read is forwarded there as before): - hostResources: CPU, cores and memory from HostResources, the result field of upstream PR pingdotgg#34293 (closed upstream without merging), same name and schema. Its export in McpHttpServer.ts, its lines in upstream test files and its new tool description are not carried: the fork adds no lines there. The fork file finds the sampler with Effect.serviceOption instead of a new tool dependency, so no upstream test needs a new mock. Its tests moved to fork test files. - placement: labels (empty: no setting holds them yet, P2 adds it), available and reason, runningAgents, slotsFree, memoryFloorMb, freeMemoryMb from the slot gate's existing status read (SlotGate.usage), and factsAt. A slot gate that cannot be read (fails, dies, takes longer than its own count limit, is not running, or the settings cannot be read) gives available: false with a reason and no count. A linked machine on an older T3 leaves both fields out: no facts, not a failed read. Nothing is stored; each read measures again. Result fields are not in the measured tool list, so the budget files are unchanged. The two environment toolkit files take the four lines announced in #779, moved from announced to added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
LensVerdict: SAFE (head a2660ce). Normal tier, one lens (correctness, public/secret, state, seam, tests). Blocking: none. Major: none. Minor (follow-ups, none blocks the merge):
Checked and OK:
|
This was referenced Nov 21, 2026
# Conflicts: # .github/fork-seams.json # FORK_CHANGES.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Placement P3 (facts out): t3_environment_read returns hostResources and placement
t3_environment_read now returns two optional fields beside upstream's, for this
machine and for a linked one (the read is forwarded there as before):
upstream PR feat(server): let agents read host CPU and memory load through t3_environment_read pingdotgg/t3code#34293 (closed upstream without merging), same name and schema.
Its export in McpHttpServer.ts, its lines in upstream test files and its new
tool description are not carried: the fork adds no lines there. The fork file
finds the sampler with Effect.serviceOption instead of a new tool dependency,
so no upstream test needs a new mock. Its tests moved to fork test files.
and reason, runningAgents, slotsFree, memoryFloorMb, freeMemoryMb from the
slot gate's existing status read (SlotGate.usage), and factsAt.
A slot gate that cannot be read (fails, dies, takes longer than its own count
limit, is not running, or the settings cannot be read) gives available: false
with a reason and no count. A linked machine on an older T3 leaves both fields
out: no facts, not a failed read. Nothing is stored; each read measures again.
Result fields are not in the measured tool list, so the budget files are
unchanged.
The two environment toolkit files take the four lines announced in #779, moved
from announced to added.
Tests
New fork test files
apps/server/src/fork/environmentFacts.test.tsandenvironmentFacts.linked.test.ts(this machine, a linked machine, an older linked T3, a slot gate that fails / dies / times out / is not running, unreadable settings; each read measures again, nothing stored).General vs project
General: the facts are generic host facts for any fleet; no project names, paths or machines. Project facts (labels) come later from settings (P2).
Upstream fit
Builds on upstream
t3_environment_readand the HostResources shape from an upstream PR that closed without merging (same name and schema); the only upstream-file lines are the four seam lines announced and pinned in #779.Placement design P3, step 2 (code after the seam PR #779).
🤖 Generated with Claude Code